Skip to content

Multiple fixes#1512

Merged
GianniCarlo merged 7 commits intodevelopfrom
fix-multiple
Apr 19, 2026
Merged

Multiple fixes#1512
GianniCarlo merged 7 commits intodevelopfrom
fix-multiple

Conversation

@GianniCarlo
Copy link
Copy Markdown
Collaborator

Bugfix

  • Fix crash on Mac when trying to share debug file information
  • Fix dismissing Jellyfin and Audiobookshelf after tapping to download folder
  • Fix name suggestion for folder after import
  • Fix import screen being dismissed on app launch by non-related alerts
  • Fix files not being removed from the shared folder where files are copied with the Share extension

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR delivers a set of import/navigation/share bugfixes across the app, including improved file-origin detection for imports, more reliable dismissal behavior for media server flows, and a safer debug-info export path on iOS-app-on-Mac.

Changes:

  • Add path-based helpers to distinguish app-managed import sources (Documents + App Group SharedFiles) and use them to avoid circular imports and to delete copied source files appropriately.
  • Replace ShareLink + Transferable on iOS-app-on-Mac with a fileExporter flow using an explicit default filename to avoid a macOS share crash.
  • Improve presentation/dismissal behavior by swallowing “missing file” preload errors and wiring navigation dismissal closures for Jellyfin/AudiobookShelf download flows.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
Shared/CoreData/DataManager.swift Introduces isInDocumentsFolder and isAppManagedSource helpers for safer import/source classification.
BookPlayer/Settings/SettingsView.swift Adds a loading overlay at the Settings root level.
BookPlayer/Settings/Sections/SettingsSupportSectionView.swift Switches debug info sharing to fileExporter on iOS-app-on-Mac; adds loading-state usage and document state.
BookPlayer/Settings/Sections/DebugFileTransferable.swift Refactors debug data generation into generateDebugData() and adds a FileDocument wrapper for exporting.
BookPlayer/MediaServerIntegration/BPNavigation.swift Changes dismissal from DismissAction to a generic closure.
BookPlayer/Library/ItemList/LibraryRootView.swift Silently ignores fileMissing during cold-launch preload to avoid presentation races.
BookPlayer/Library/ItemList/ItemListViewModel.swift Updates circular-import prevention to use isInDocumentsFolder.
BookPlayer/Jellyfin/JellyfinRootView.swift Wires navigation.dismiss to onDismiss so download flows can dismiss correctly.
BookPlayer/Import/Models/ImportOperation.swift Uses isAppManagedSource to delete copied sources from Documents/SharedFiles; improves folder-name detection exclusions.
BookPlayer/AudiobookShelf/AudiobookShelfRootView.swift Wires navigation.dismiss to onDismiss so download flows can dismiss correctly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +105 to +112
.fileExporter(
isPresented: $isExportingDebugFile,
document: debugDocument,
contentType: .plainText,
defaultFilename: "bookplayer_debug_information"
) { _ in
debugDocument = nil
}
Comment on lines +93 to +98
Task {
loadingState.show = true
let data = await file.generateDebugData()
loadingState.show = false
debugDocument = DebugFileDocument(data: data)
isExportingDebugFile = true
Comment on lines +190 to 193
if DataManager.isAppManagedSource(fileURL) {
fileURL.disableFileProtection()
try? FileManager.default.removeItem(at: fileURL)
}
@GianniCarlo GianniCarlo merged commit edc121a into develop Apr 19, 2026
1 check passed
@GianniCarlo GianniCarlo deleted the fix-multiple branch April 19, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants